package Month11.Day23;

import Month11.Day22.Account;

import java.util.Scanner;

public class User extends Thread {
    private String name;

    public User(String name) {
        super(name);
    }

    @Override
    public void run() {
        try {
            Scanner in = new Scanner(System.in);
            System.out.println("请输入账户：");
            String ID = in.next();
            System.out.println("请输入密码：");
            String password = in.next();
            if (ID.equals("admin") && password.equals("admin")) {
                System.out.println("Welcome to..........");
                return;
            } else {
                System.out.println("账户和密码不匹配，输入错误，无法登录！");
            }

        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
